package com.yykj.hospital.server.model.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yykj.common.util.serializer.LocalDate2LongSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDateTime;

@Data
@Entity
public class DoctorDrugAdvice {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private Integer hospitalId;

    @ApiModelProperty("医生ID")
    private String doctorId;

    @ApiModelProperty("药品ID，暂时没做，保留")
    private String drugId;

    @ApiModelProperty("药品名称")
    private String drugName;

    @ApiModelProperty("药品规格")
    private String drugSpecs;

    @ApiModelProperty("药品使用频率")
    private String drugFrequency;

    @ApiModelProperty("用法：口服，外用等")
    private String drugUseType;

    @ApiModelProperty("用量：一次2片，一次3瓶等")
    private String drugUseAmount;

    @ApiModelProperty("数量：1盒，1瓶等")
    private String amount;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("备注")
    private String remark;

    @UpdateTimestamp
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    private LocalDateTime modifyTime;
}
